﻿using System;
using System.Collections.Generic;

namespace EnterpriseFramework.DataAccess
{
    public class QueryResult
    {
        public SearchCriteria WhereClause { get; set; }
        public SearchCriteria HavingClause { get; set; }
        public string OrderBy { get; set; }
        public string GroupBy { get; set; }
        public int Top { get; set; }
        public string Distinct { get; set; }
        public string ColumnExpression { get; set; }
        public List<Join> InnerJoin { get; set; }
        public List<Join> LeftJoin { get; set; }
        public List<Join> RightJoin { get; set; }
        public List<Join> FullJoin { get; set; }
        public List<Join> CrossJoin { get; set; }
    }

    public class KeyValue
    {
        public string Key { get; set; }
        public string Value { get; set; }
    }
    public class SearchCriteria
    {
        public string Criteria { get; set; }
        public IParameter[] Parameters { get; set; }
    }
    public class Join
    {
        public Join(string Table1, string Table2, string Condition)
        {
            this.Table1 = Table1;
            this.Table2 = Table2;
            this.Condition = Condition;
        }
        public string Table1 { get; set; }
        public string Table2 { get; set; }
        public string Condition { get; set; }
    }
}
